package com.example.treehole.database.database;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.treehole.database.bean.History;

import java.util.List;


@Dao
public interface DatabaseDao {


    @Insert
    void addHistory(History history);

    @Query("select * from history where account = :account order by id desc limit :count ")
    List<History> getMyHistory(String account, int count);


    @Query("select * from history where account = :account and provinces=:provinces and city = :city")
    History getMyHistory(String account, String provinces, String city);
}
